// 引入公共utils
import axios from '@/utils/utils'

// 获取分类
export let getlist = params => axios.get('/goods/catelist', { params })

// 添加分类
export let addlist = params => axios.post('/goods/addcate', params)

// 删除分类
export let delcate = params => axios.get('/goods/delcate', { params })

// 修改分类
export let editcate = params => axios.post('/goods/editcate', params)

// 获取商品列表
export let goodlist = params => axios.get('/goods/list', { params })

// 删除商品
export let delgood = params => axios.get('/goods/del', { params })

// 修改商品
export let editgood = params => axios.post('/goods/edit', params)

// 获取订单列表(带查询功能)
export let getorder = params => axios.get('/order/list', { params })

// 获取订单详情
export let detail = params => axios.get('/order/detail', { params })

// 获取修改订单
export let orderedit = params => axios.post('/order/edit', params)

// 查询所有分类名称
export let categories = params => axios.get('/goods/categories', { params })

// 添加商品
export let addproduct = params => axios.post('/goods/add', params)
